//
//  SubColumnModel.m
//  BaseFramework01
//
//  Created by IMAC on 2017/6/2.
//  Copyright © 2017年 IMAC. All rights reserved.
//

#import "SubColumnModel.h"

@implementation SubColumnModel
+(NSMutableArray *)requestForSubComlumnListDataWithSuper:(BaseColumnModel *)model {
    
    
    NSURL *url = [[NSBundle mainBundle] URLForResource:@"testForSubComlumnList.json" withExtension:nil ];
    NSDictionary *dict  =  [NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfURL: url ] options:NSJSONReadingAllowFragments error:nil];
    NSArray *dataArray = dict[@"data"][@"subColumnInfos"];
    NSMutableArray *arrm = [NSMutableArray arrayWithCapacity:dataArray.count];
    for (NSDictionary *dict in dataArray) {
        SubColumnModel *subModel = [[SubColumnModel alloc]initWithDict:dict];
        subModel.columnID = model.columnID;
        subModel.columnName = model.columnName;
        subModel.columnType = model.columnType;
        [arrm addObject:subModel];
    }
    return arrm;
}
@end
